<%
layout("/common/layout.html",{title:"首页"}){
%>

<% for(var i = 0;i< page.list.~size;i=i+2){%>
<div class="row">
    <div class="col-md-6 col-sm-6">
        <article class=" blog-teaser">
            <header>
                <img src="${page.list[i].img}" alt="">
                <h3><a href="${ctxPath}/detail?id=${page.list[i].id!}">
                    <%
                    var title = page.list[i].title;

                    if(isNotEmpty(title)&&strutil.length(title)>11){%>
                    ${strutil.subStringTo(title,0,11)}...
                    <%}else{%>
                    ${title!"无标题"}
                    <%}%>
                </a></h3>
                <span class="meta">${@com.ibeetl.blog.function.PrintTimeUtil.printTime(page.list[i].createTime,"yyyy-MM-dd HH:mm:ss")}</span>
                <hr>
            </header>

        </article>
    </div>
    <%if((i+1) < page.list.~size){%>
    <div class="col-md-6 col-sm-6">
        <article class=" blog-teaser">
            <header>
                <img src="${page.list[i+1].img}" alt="">
                <h3><a href="${ctxPath}/detail?id=${page.list[i].id!}">
                    <%
                    title = page.list[i+1].title;

                    if(isNotEmpty(title)&&strutil.length(title)>11){%>
                    ${strutil.subStringTo(title,0,11)}...
                    <%}else{%>
                    ${title!"无标题"}
                    <%}%>
                </a></h3>
                <span class="meta">
                    ${@com.ibeetl.blog.function.PrintTimeUtil.printTime(page.list[i+1].createTime,"yyyy-MM-dd HH:mm:ss")}</span>
                <hr>
            </header>
        </article>
    </div>
    <%}%>
</div>

<%}%>

<#page page="${page}" condition='${"&keyword="+keyword!+"&category="+category!}'/>
<% } %>


